package com.dognessnetwork.operation.dognecklace.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

@Entity
@Table(name = "device_test_info")
public class DeviceTestInfo implements Serializable {
	
	/**
	 * 
	 * 设备测试数据记录
	 * 
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id")
    private Long id;

	/**
	 * 
	 * 设备表ID
	 * 
	 */
	@NotNull
	@Column(name = "device_info_id")
    private Long deviceInfoId;

	/**
	 * 
	 * 嵌入式软件版本号
	 * 
	 */
	@Column(name = "version")
    private String version;

	/**
	 * 
	 * 设备产品ID
	 * 
	 */
	@NotNull
	@Column(name = "device_product_id")
    private Long deviceProductId;

	/**
	 * 
	 * 区域表ID
	 * 
	 */
	@NotNull
	@Column(name = "sale_area_id")
    private Long saleAreaId;

	@Column(name = "test_count")
    private Integer testCount;

	@Column(name = "gps_success")
    private Integer gpsSuccess;

	@Column(name = "wifi_success")
    private Integer wifiSuccess;

	@Column(name = "g_sensor_success")
    private Integer gSensorSuccess;

	/**
	 * 
	 * 绑定是否成功，默认0:失败，1:成功
	 * 
	 */
	@Column(name = "is_bind_success")
    private Boolean isBindSuccess;

	@NotNull
	@Column(name = "create_time")
    private Date createTime;

	@Column(name = "edit_time")
    private Date editTime;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getDeviceInfoId() {
        return deviceInfoId;
    }

    public void setDeviceInfoId(Long deviceInfoId) {
        this.deviceInfoId = deviceInfoId;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version == null ? null : version.trim();
    }

    public Long getDeviceProductId() {
        return deviceProductId;
    }

    public void setDeviceProductId(Long deviceProductId) {
        this.deviceProductId = deviceProductId;
    }

    public Long getSaleAreaId() {
        return saleAreaId;
    }

    public void setSaleAreaId(Long saleAreaId) {
        this.saleAreaId = saleAreaId;
    }

    public Integer getTestCount() {
        return testCount;
    }

    public void setTestCount(Integer testCount) {
        this.testCount = testCount;
    }

    public Integer getGpsSuccess() {
        return gpsSuccess;
    }

    public void setGpsSuccess(Integer gpsSuccess) {
        this.gpsSuccess = gpsSuccess;
    }

    public Integer getWifiSuccess() {
        return wifiSuccess;
    }

    public void setWifiSuccess(Integer wifiSuccess) {
        this.wifiSuccess = wifiSuccess;
    }

    public Integer getgSensorSuccess() {
        return gSensorSuccess;
    }

    public void setgSensorSuccess(Integer gSensorSuccess) {
        this.gSensorSuccess = gSensorSuccess;
    }

    public Boolean getIsBindSuccess() {
        return isBindSuccess;
    }

    public void setIsBindSuccess(Boolean isBindSuccess) {
        this.isBindSuccess = isBindSuccess;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getEditTime() {
        return editTime;
    }

    public void setEditTime(Date editTime) {
        this.editTime = editTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", deviceInfoId=").append(deviceInfoId);
        sb.append(", version=").append(version);
        sb.append(", deviceProductId=").append(deviceProductId);
        sb.append(", saleAreaId=").append(saleAreaId);
        sb.append(", testCount=").append(testCount);
        sb.append(", gpsSuccess=").append(gpsSuccess);
        sb.append(", wifiSuccess=").append(wifiSuccess);
        sb.append(", gSensorSuccess=").append(gSensorSuccess);
        sb.append(", isBindSuccess=").append(isBindSuccess);
        sb.append(", createTime=").append(createTime);
        sb.append(", editTime=").append(editTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}